@include b(rating) {
  @include polyfill-column-gap(8px);

  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 1.2em;
  color: var(--#{$rd-prefix}color-warning);

  @include when(disabled) {
    pointer-events: none;
    filter: opacity(50%);
  }

  @include m(read-only) {
    pointer-events: none;
  }

  @include e(star) {
    position: relative;
    transition: transform var(--#{$rd-prefix}animation-duration-fast) linear;

    &:hover {
      transform: scale(1.2);
    }

    @include when(focus) {
      transform: scale(1.2);
    }
  }

  @include e(icon) {
    color: var(--#{$rd-prefix}rating-background-color);
    transition: color var(--#{$rd-prefix}animation-duration-fast) linear;

    @include when(checked) {
      color: inherit;
    }

    @include m(half) {
      position: absolute;
      top: 0;
      left: 0;
      width: 50%;
      height: 100%;
      overflow: hidden;
    }
  }

  @include e(input) {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    appearance: none;

    @include m(half) {
      z-index: 5;
      width: 50%;
    }
  }
}
